'use strict';
const db = uniCloud.database()
exports.main = async (event, context) => {
	const {
		user_id,
		nickName,
		realName,
		birth,
		height,
		education,
		intro,
		hobby,
		demand,
		address,
		isCar,
		isHouse,
		position,
		department,
		redidence,
		updatetime,
		sex,
		money,
		wedding,
		imgList,
		emotional
	} = event
	await db.collection('users').where({user_id:user_id}).update({
		nickName:nickName,
		realName:realName,
		birth:birth,
		height:height,
		education:education,
		intro:intro,
		hobby:hobby,
		demand:demand,
		address:address,
		isCar:isCar,
		isHouse:isHouse,
		position:position,
		department:department,
		redidence:redidence,
		updatetime:updatetime,
		sex:sex,
		money:money,
		wedding:wedding,
		imgList:imgList,
		emotional:emotional
	})
	//返回数据给客户端
	return {
		code: 200,
		msg: '数据更新成功'
	}
};